Field
The following description relates to time synchronization technology based on timestamps.
Description of Related Art
In general, time synchronization technology is technology that synchronizes local time, based on a timer provided in a remote device, with global time. Technologies that are widely known as time synchronization technologies include Network Time Protocol (NTP) and Simple Network Time Protocol (SNTP), each of which is appropriate for applications requiring lower precision. A technology known as Precision Time Protocol (PTP) is known as an appropriate technology for certain applications requiring higher precision.
These time synchronization technologies are chiefly designed as follows. A master providing global time and a slave having local time are configured to exchange special messages with each other. The slave then calculates the error, i.e., the offset, of its local time in relation to the global time of the master and calculates a delay time related to message transmission. Subsequently, the slave may correct its timer.
The offset and the delay time may be calculated by the slave using timestamps in which the transmission and reception times of messages are recorded. In the relatively simple NTP protocol, a slave transmits a first message, including a timestamp of transmission point T1 based on local time, to a master in accordance with global time. First, a master records a timestamp of the reception point T2 of the first message based on the global time. Next, the master transmits a second message, including the timestamps of the reception point T2 of the first message and a transmission point T3 of the second message, to the slave based on the global time after the passage of a threshold period of time. Next, the slave records the timestamp of a reception point T4 of the second message based on the local time. Since the slave knows each of the transmission point T1 (i.e., based on the local time) of the first message, the reception point (i.e., based on the global time) of the first message, the transmission point (i.e., based on the global time) of the second message and the reception point (i.e., based on the local time) of the second message, the slave can calculate the difference between the local time-based transmission point T1 of the first message and a corresponding actual global time-based point, i.e., the offset between local time and global time, and can also calculate actual delay time related to the transmission and reception of the message.
In the PTP protocol, message transmission and reception between a master and an individual slave are repeated three times (or four times in a case in which a request message is included) according to the Institute of Electrical and Electronics Engineers (IEEE) 1588 Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems, published in 2002 (hereafter “IEEE 1588”), and are repeated seven times (or eight times in a case in which a request message is included) in the case of the more complicated IEEE 1588v2.
Although offset and rate may be corrected once a day in a personal computer system that is normally used for access to the Internet, or for the handling of office work, each slave corrects local time between 1 and 10 times per second in applications requiring microsecond-level precision. Further, a number of slaves correct local time in each period of 1 ms in industrial applications requiring nanosecond-level precision. Although in other contexts 1 ms may be viewed as being short, in this context, if one tick is 1 nanosecond (ns), then a period of 1 ms corresponds to about one million ticks, and thus the time offset and drift during this period cannot not be ignored.
In cases requiring strict determinism, such as that of an industrial network (e.g., in a factory automation facility), or that of a network within a vehicle (e.g., in an advanced driver assistance system (ADAS)), the number of slaves needed to correct local time is large and the correction period is short. Thus, the load attributable to a time synchronization operation may be significant.
Accordingly, there is concern that determinism may be influenced by the additional load of time synchronization operations being performed to ensure the determinism. Hence, there is a need for a scheme that is capable of reducing the load attributable to a time synchronization operation, while still ensuring time precision.